#include "finsh_config.h"


#ifdef FINSH_ENABLE

#include "finsh.h"
#include "finsh_system.h"

#define LIST_FIND_OBJ_NR 8

long hello(void)
{
    finsh_printf("Hello RT-Thread!\n");

    return 0;
}
FINSH_FUNCTION_EXPORT(hello, say hello world);


long version(void)
{
	finsh_system_show_version();
	return 0;
}
FINSH_FUNCTION_EXPORT(version, show version information);
MSH_CMD_EXPORT(version, show version information);


long reboot(void)
{
	finsh_hw_reboot();
	return 0;
}
MSH_CMD_EXPORT(reboot, reset system);

long poweroff(void)
{
	finsh_hw_reboot();
	return 0;
}
MSH_CMD_EXPORT(poweroff, shutdown system);

long ps(void)
{
	finsh_system_ps();
	return 0;
}
MSH_CMD_EXPORT(ps, process status);

long kill(int argc, char **argv)
{
	return (long)finsh_system_kill(argc, argv);
}
MSH_CMD_EXPORT(kill, kill the task by ID);

long freex(int argc, char **argv)
{
	return (long)finsh_system_free(argc, argv);
}
//MSH_CMD_EXPORT(freex, show the memory usage in the system.)
FINSH_FUNCTION_EXPORT_CMD(freex, __cmd_free, show the memory usage in the system.)

long uname(int argc, char **argv)
{
	return (long)finsh_system_uname(argc, argv);
}
MSH_CMD_EXPORT(uname, print system information)










#endif

